package com.ihr360.cnb.module.insurance.controller;

import com.ihr360.excel.constant.Ihr360SpreadSheetConstant;
import com.ihr360.excel.validation.AbstractSpreadSheetValidateController;
import com.ihr360.excel.vo.CustomSpreadSheetValidateResult;
import com.ihr360.excel.vo.SpreadSheetSpecification;
import com.ihr360.excel.vo.SpreadSheetValidatorRequest;
import com.ihr360.maven.plugin.ModuleCodeStore;
import com.ihr360.maven.plugin.annotation.FunctionDefinition;
import com.ihr360.maven.plugin.annotation.ModuleDefinition;
import com.ihr360.shared.advice.response.DisableResponseAdvice;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Stone.Shi
 * @description
 * @date 2018-05-20 16:01:23.
 */
@RestController
@RequestMapping(value = Ihr360SpreadSheetConstant.PRE_HTTP_VALIDATE_PATH)
@DisableResponseAdvice
@ModuleDefinition(mainModuleCode = ModuleCodeStore.Module.BENEFIT_CODE,
        mainModuleName = ModuleCodeStore.Module.BENEFIT_NAME,
        subModuleCode = ModuleCodeStore.Module.Benefit.STAFF_SIHF_ARCHIVE_CODE,
        subModuleName = ModuleCodeStore.Module.Benefit.STAFF_SIHF_ARCHIVE_NAME)
public class StaffBenefitImportValidateController extends AbstractSpreadSheetValidateController {

    @FunctionDefinition(functionName = "社保公积金方案员工导入的自定义校验", functionCode = ModuleCodeStore.Function.IMPORT)
    @PostMapping(value = Ihr360SpreadSheetConstant.HTTP_CUSTOM_VALIDATE_PATH)
    @Override
    public CustomSpreadSheetValidateResult getCustomValidateResult(@RequestBody SpreadSheetValidatorRequest request) {
        return super.getCustomValidateResult(request);
    }

    @FunctionDefinition(functionName = "社保公积金方案员工导入的常规校验", functionCode = ModuleCodeStore.Function.IMPORT)
    @PostMapping(value = Ihr360SpreadSheetConstant.HTTP_COMMON_VALIDATE_PATH)
    @Override
    public SpreadSheetSpecification getCommonSpecification(@RequestBody SpreadSheetValidatorRequest request) {
        return super.getCommonSpecification(request);
    }

}
